<%-- 
    Document   : navigation
    Created on : 21 nov. 2011, 23:40:01
    Author     : julien
--%>
<%@page import="Catalogue.Panier"%>
<div id="navigation">
    
    <!--Menu start -->
    <div id="menu">
        <jsp:include page='authStatus.jsp'/>
        <h2>Navigation</h2>
        <ul class="menu-list">
            <li><a title="Accueil" href="http://<% out.print(request.getServerName() + ":" + application.getInitParameter("portHttp") + request.getContextPath());%>/index.jsp">Accueil</a></li>
            <li><a title="Animaux" href="http://<% out.print(request.getServerName() + ":" + application.getInitParameter("portHttp") + request.getContextPath());%>/AnimalServlet">Nos animaux</a></li>
            <li><a title="Catalogue" href="http://<% out.print(request.getServerName() + ":" + application.getInitParameter("portHttp") + request.getContextPath());%>/CatalogueServlet">Notre catalogue</a></li>
            <li><a title="Recherche" href="http://<% out.print(request.getServerName() + ":" + application.getInitParameter("portHttp") + request.getContextPath());%>/ArticleServlet">Rechercher un article</a></li>
            <%
                Panier monPanier = (Panier) session.getAttribute("panier");
                if (monPanier == null) {
                    monPanier = new Panier();
                }
            %>
            <li><a title="Panier" href="http://<% out.print(request.getServerName() + ":" + application.getInitParameter("portHttp") + request.getContextPath());%>/panier.jsp"><% out.print(monPanier.toString());%></a></li>
           
        </ul>

        <%        if (request.getSession().getAttribute("user") != null) {
                ObjetData.Utilisateur currentUser = (ObjetData.Utilisateur) request.getSession().getAttribute("user");
                if (currentUser.getIsAdmin() == 1) {%>
        <h2>Administration</h2>
        <ul class="menu-list">
            <li><a title="Ajout_article" href="http://<% out.print(request.getServerName() + ":" + application.getInitParameter("portHttp") + request.getContextPath());%>/ajoutArticleServlet">Ajouter un article</a></li>
            <li><a title="AjoutLienPhoto" href="http://<% out.print(request.getServerName() + ":" + application.getInitParameter("portHttp") + request.getContextPath());%>/AjouterLienPhoto">Ajouter des liens vers des photos</a></li>
            <li><a title="Web_Service" href="http://<% out.print(request.getServerName() + ":" + application.getInitParameter("portHttp") + request.getContextPath());%>/resources/catalogue">Web service</a></li>
        </ul>    
        <% }
            }%>
    </div><!--/menu -->
    <!--Menu end -->


</div>